package com.hubu.core;
import java.util.*;
public class BPlusTreeTest {
    public static void testTree() {
        Random random = new Random();
        BPlusTree<Integer, Integer> tree = new BPlusTree<>(100, null);
        Set<Integer> set = new HashSet<>();
        for(int i = 1; i <= 1000000; i++) {
            int i1=random.nextInt(1000000);
            set.add(i1);
            tree.put(i1,i1);
        }
        Iterator<Integer> iterator = set.iterator();
        while(iterator.hasNext()){
            Integer remove = tree.remove(iterator.next());
            if(remove!=null){

            }else{
                System.out.println("error");
            }
        }
        System.out.println("hello world");
    }
    public static void testTree2(){
        BPlusTree<Integer,Integer> tree=new BPlusTree<>();
        Integer put = tree.put(1, 1);
        System.out.println(put);
        System.out.println(tree.get(1));
        System.out.println(tree.remove(1));
    }
    public static void main(String[] args) {
       testTree();
    }
}
